package cn.myword.wordTemple.tools;

import java.util.ArrayList;
import java.util.List;

public class UrlHandle {

    public static List<String> getUrls(String tableName){//
        List<String> urls = new ArrayList<String>();
        urls.add( "/prefix/"+tableName+"/other/add");
        urls.add( "/prefix/"+tableName+"/other/addBatch");
        urls.add( "/prefix/"+tableName+"/other/update");
        urls.add( "/prefix/"+tableName+"/other/updateBatch");
        urls.add( "/prefix/"+tableName+"/other/deleteByIds");
        urls.add( "/prefix/"+tableName+"/list/getByIds");
        urls.add( "/prefix/"+tableName+"/list/getList");
        urls.add( "/prefix/"+tableName+"/list/get"+capitalizeFirstLetter(tableName)+"Page");
        return urls;
    }

    public static String capitalizeFirstLetter(String tableName) {
        if (tableName == null || tableName.isEmpty()) {
            return tableName; // 如果字符串为空，直接返回
        }
        // 将首字母转换为大写
        return tableName.substring(0, 1).toUpperCase() + tableName.substring(1);
    }

}

